# 制作出9*9乘法表
i = 1
while i < 10:
    j = 1
    while j < i:
        print(f'{j}*{i}={i * j}\t', end='')
        j += 1
    i += 1
    print()

j = 0
i = 1
while i <= 100:
    j += i
    i += 1
print(f'1-100累加后的值为:{j}')

# 判断1-100次那次猜到随机数
import random

num = random.randint(1, 100)
count = 0
flag = True
while flag:
    count += 1
    guess_num = int(input(f'{num}请输入你猜测的数字'))
    if guess_num == num:
        print(f'猜中了,你猜了{count}次就猜中了')
        flag = False
    else:
        print('不对,请再输入一次')
        if guess_num > num:
            print('你猜的大了')
        else:
            print('你猜的小了')
